<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class user_model extends CI_Model {

    var $title   = '';
    var $content = '';
    var $date    = '';

    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }
    
    function getUserById($user_id){
        $query = $this->db->get_where('sy_users', array('id' => $user_id));
        if($query->num_rows() == 1){
            return $query->row();
        }
        return false;
    }
    
    function getUserByName($username){
        $query = $this->db->get_where('sy_users', array('username' => $username));
        if($query->num_rows() == 1){
            return $query->row();
        }
        return false;
    }



}
?>
